﻿@model  QqhrCitizen.Models.ViewModel.vRegister
@{
    ViewBag.Title = "注册_齐齐哈尔市民学习网";
    Layout = null;
}
<!DOCTYPE html>
<!-- saved from url=(0081)http://member.shlll.net/home/signup?redirect=http://www.shlll.net/main/index.html -->
<html class=" js flexbox canvas canvastext webgl no-touch geolocation postmessage websqldatabase indexeddb hashchange history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity cssanimations csscolumns cssgradients cssreflections csstransforms no-csstransforms3d csstransitions fontface generatedcontent video audio localstorage sessionstorage webworkers applicationcache svg inlinesvg smil svgclippaths" lang="en" style="">
<!--<![endif]-->
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>@ViewBag.Title </title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="shortcut icon" href="http://member.shlll.net/file/images/logo.ico">

    <link href="~/Styles/app_home.css" rel="stylesheet" media="screen">
    <link href="~/Styles/citizen.css" rel="stylesheet" />
    <script src="~/Scripts/jquery.js"></script>
    <script src="~/Scripts/qqhrcitizen.base.js"></script>
    <script src="~/Scripts/citizen.js"></script>


    <script type="text/javascript">
        function frmCheck() {
            if (!CheckUsername()) return false;
            if (!CheckPassword()) return false;
            if (!CheckEmail()) return false;
        }
        function CheckUsername() {
            if ($("#Username").val() == "") {
                CastMsg("用户名不能为空");
                $("#user_msg").html("用户名不能为空")
                return false;
            }
            return true;
        }
        function CheckPassword() {
            if ($('#Password').val() == "") {
                CastMsg("密码不能为空")
                $("#pwd_msg").html("用户名不能为空");
                return false;
            }
            if ($('#Confirm').val() == "") {
                CastMsg("密码重复不能为空！");
                $("#pwd_msg").html("密码重复不能为空");
                return false;
            }
            if ($("#Password").val().length < 4) {
                CastMsg("至少输入4位密码");
                $("#pwd_msg").html("密码重复不能为空");
                return false;
            }
            if ($('#Password').val() != $('#Confirm').val()) {
                CastMsg("两次输入密码不一致");
                $("#repwd_msg").css("color:red");
                return false;
            }
            return true;
        }
        function CheckEmail() {
            if ($("#Email").val() == "") {
                CastMsg("至少输入4位密码");
                $("#email_msg").html("至少输入4位密码");
                return false;
            }
            var myreg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
            if (!myreg.test($("#Email").val())) {
                CastMsg("邮箱格式输入错误！");
                $("#email_msg").html("邮箱格式输入错误");
                return false;
            }
            return true;
        }

    </script>
</head>
<body class="home__signup">
    <div id="d_main" class="d-main" style="min-width: 1000px;">
        <div class="container">
            <div id="d_top" class="d-top">
                <div id="d_top_c" class="d-top-c">
                    <!-- region start: top -->
                    <div id="d_topmenu" class="d-topmenu">
                        <div class="d-top-nav">
                            <div class="body">
                               @foreach (var item in ViewBag.Navigation)
                               {
                                   if (@item.Url != "Null")
                                   {
                                    <a id='@item.Nav_Id' class="item" href="@item.Url" target="_parent">@item.Title</a>
                                   }
                               }
                            </div>
                        </div>
                        <div id="d_top_sign" class="d-top-sign">
                            <div class="body">
                                <span class="txt">欢迎来到齐齐哈尔市民学习网</span>
                                <a class="item" href="/User/Login" target="_self">登录</a>
                                <a class="item last" href="/User/Register" target="_self">注册</a>
                            </div>
                        </div>
                    </div>
                    <!-- region end: top -->
                </div>
            </div>
            <div id="d_header" class="d-header" style="border-bottom:1px solid #f09e3d;">
                <div id="d_header_c" class="d-header-c">
                    <!-- region start: header -->
                    <div id="d_headerhome" class="d-headerhome">
                        <a class="d-logo logo-use" href="/Home/Index"></a>
                        <div class="d-search"></div>
                    </div>
                    <!-- region end: header -->
                </div>
            </div>
            <div id="d_bottom" class="d-bottom" style="visibility: hidden;">
                <div class="d-bottom-c">
                    <div id="d_scrolltop" class="d-scrolltop">
                        <span class="t" onclick="$('html,body').animate({scrollTop: '0px'}, 800);">顶部</span>
                    </div>
                </div>
            </div>

            <div class="d-row" style="margin-bottom: 20px; padding: 20px 0 20px 0;">
                <div class="d-row-c">
                    <div class="d-col-1">
                        <div class="contentarea">
                            <!-- region start: 注册 -->
                            <div id="d_signup" class="d-signup" data-km-url="/home/action/signup">
                                <div class="head">
                                    齐齐哈尔市民学习网用户注册
                                </div>
                                @using (Html.BeginForm("Register", "User", FormMethod.Post, new
                                {
                                    onsubmit = "return frmCheck();"
                                }))
                                {
                                    @Html.AntiForgeryToken();
                                    <div class="body">
                                        <table class="tbl">
                                            <tbody>
                                                <tr>
                                                    <td>
                                                        <div>
                                                            用户名
                                                        </div>
                                                    </td>
                                                    <td>
                                                        <div>
                                                            @Html.TextBoxFor(model => model.Username, new { @class = "int-hs", id = "Username" })
                                                            <br><span class="text" id="user_msg">用户名长度在1-30个字之间；只能由字母、数字和下划线组成；不能以下划线开头。例：study_001</span>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div>
                                                            电子邮箱
                                                        </div>
                                                    </td>
                                                    <td>
                                                        <div>
                                                            @Html.TextBoxFor(model => model.Email, new { @class = "int-hs", id = "Email" })
                                                            <span class="text" id="email_msg"></span>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div>
                                                            角色
                                                        </div>
                                                    </td>
                                                    <td>
                                                        <div>
                                                            <select name="RoleAsInt">
                                                                <option value="0">一般用户</option>
                                                                <option value="1">商户</option>
                                                            </select>
                                                            <span class="text" id="email_msg"></span>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div>
                                                            密码
                                                        </div>
                                                    </td>
                                                    <td>
                                                        <div>
                                                            @Html.PasswordFor(modal => modal.Password, new { @class = "int-hs", id = "Password" })
                                                            <br><span class="text" id="pwd_msg">密码长度在1-20个字之间；只能由字母、数字和下划线组成。</span>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div>
                                                            确认密码
                                                        </div>
                                                    </td>
                                                    <td>
                                                        <div>
                                                            @Html.Password("Confirm", "", new { @class = "int-hd", id = "Confirm" })
                                                            <span class="text" id="repwd_msg"></span>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div>
                                                            &nbsp;
                                                        </div>
                                                    </td>
                                                    <td>
                                                        <div>
                                                            <input id="int_submit" type="submit" class="btn btn-orange btn-big" value="注册" style="width:120px;">
                                                            @Html.ValidationSummary(true)
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div>
                                                            &nbsp;
                                                        </div>
                                                    </td>
                                                    <td><div><a href="/User/Login">已经注册过？请登录。</a></div></td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                }
                            </div><!-- region end: 注册 -->
                        </div>
                    </div>
                </div>
            </div>
            <div class="d-row" style="background-color: #ececec; border-top: 2px solid #474747;">
                <div class="d-row-c">
                    <div id="d_footer" class="d-footer">
                        <div id="d_footer_c" class="d-footer-c">
                            <div class="l" style="display: block;">
                                Copyright © 2015 齐齐哈尔市广播电视大学. All Rights Reserved. 黑ICP备06004733-2号
                            </div><div class="clear"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
</html>